import Request from "@/common/utils/request/index";

enum Api {
  GetAllClientRoles = "/jeecgboot/pos/users/getAllClientRoles",
  GetUserList = "/jeecgboot/pos/users/list",
  AddClientUser = "/jeecgboot/pos/users/add",
  EditClientUser = "/jeecgboot/pos/users/edit",
}

export const getAllClientRoles = () => {
  return Request.getInstance().send({
    url: Api.GetAllClientRoles,
    method: "GET",
  });
};

export const getUserList = (params: any) => {
  return Request.getInstance().send({
    url: Api.GetUserList,
    method: "GET",
    params,
  });
};

export const addClientUser = (params: any) => {
  return Request.getInstance().send({
    url: Api.AddClientUser,
    method: "POST",
    data: params,
  });
};

export const editClientUser = (params: any) => {
  return Request.getInstance().send({
    url: Api.EditClientUser,
    method: "POST",
    data: params,
  });
};
